import Mock from 'mockjs'

const projectList = Mock.mock({
  'list|20': [
    {
      name: '@cname', // 中文名
      account: `@word`, // 英文单词
      phone: /1[3-9][0-9]{9}/, // 正则模式
      deptName: Mock.mock('@cword(2,4)'), // 随机2-4字中文单词
      id: '@guid' // guid
    }
  ]
})

export default [
 
  {
    url: '/login/account',
    type: 'post',
    response: (res) => {
  
      return {
        code: 200,
        message: '操作成功',
        data: {
          username: '18202322320',
          password: 'XTL4SW7JqxT/JA0vJnPGyyDjA48EbzwjgnYn9GOvgpBVPSb7uI0ImWSqcAdHUu7lShFwMIWq21uHCGXA8eWjsQ=='
        }
      }
      // 使用return返回前端需要的数据
    }
  },
  {
    url: '/user/form/page',
    type: 'get',
    response: (res) => {
      // 没错，你应该已经猜到了，res.body就是我们传入到接口的数据，我们可以在这里做些逻辑操作
      // res包含完整的请求头信息
      return {
        code: 200,
        msg: null,
        data: {
          records: [
            {
              id: 43083,
              createTime: '2024-11-19 22:50:25',
              updateTime: '2024-11-20 00:22:42',
              formKey: 'LJaJ4FNx',
              name: '<p>测试表单</p>',
              textName: '测试表单',
              description:
                '<div class="form-header__container">\n<div class="form-header__title">移动校园活动续约登记</div>\n</div>\n<div class="published-form__body">\n<div class="ant-row fields">\n<div class="display-field-container" data-apicode="field_36">\n<div class="widget-buttons-container">\n<div class="widget-buttons-item"> </div>\n</div>\n</div>\n</div>\n</div>',
              sourceType: 1,
              sourceTypeDesc: '空白创建',
              sourceId: null,
              userId: 8849,
              status: 3,
              statusDesc: '停止发布',
              type: 1,
              typeDesc: '普通表单',
              deleted: false,
              folder: false,
              folderId: 0
            }
          ],
          total: 1,
          size: 12,
          current: 1,
          orders: [],
          optimizeCountSql: true,
          searchCount: true,
          maxLimit: null,
          countId: null,
          pages: 1
        },
        success: true
      }
      // 使用return返回前端需要的数据
    }
  },
  {
    url: '/public/systemInfoConfig',
    type: 'get',
    response: (res) => {
 
      return {
        code: 200,
        msg: null,
        data: '{"logo":"","name":"填鸭表单PRO","logoImg":"http://pro-oss.tduckcloud.com/6d4fa9c6ee554cd193161c4e658cb5e6.png","copyright":"<p style=\\"text-align: center;\\"><span style=\\"color: #e03e2d;\\"><span style=\\"font-size: 12px;\\">演示环境表单执行自动停止策略-请勿用作正式用途  </span><span style=\\"font-size: 12px;\\"><a style=\\"color: #e03e2d;\\" href=\\"https://beian.miit.gov.cn/#/Integrated/index\\">湘ICP备19005498号-3</a> </span></span></p>\\n<p style=\\"text-align: center;\\"><span style=\\"color: #e03e2d;\\"><span style=\\"font-size: 12px;\\"> Copyright © 2018 - 2024 Power by TDuckCloud 填鸭表单  湖南省众达数蔚信息技术有限公司 -  </span><span style=\\"font-size: 12px;\\"><a style=\\"color: #e03e2d; text-decoration: underline;\\" href=\\"https://doc.tduckcloud.com/functionDesc/account.html\\" target=\\"_blank\\" rel=\\"noopener\\">获取演示账号</a></span></span></p>","webBaseUrl":"http://pro.tduckcloud.com","backgroundImage":"https://pro-oss.tduckcloud.com/proImage/d5c6136f3f6d481794b378f265776aa2.jpeg","allowThirdPartyLogin":true,"thirdPartyLoginTypeList":["wechatOpen","wechatEnterprise"]}',
        success: true
      }
      // 使用return返回前端需要的数据
    }
  }
]
